
# 要连接数据库，才能获取用户id
from api.ihrm_emp_api import IhrmRmpApi
from common.get_token import grt_login_token
from common.sql_db_tools import DBTools
from config import TEL


def staff_id_get():
    DBTools.uid_db(f'delete from bs_user where mobile="{TEL}"')
    rsep = IhrmRmpApi.add_emp(grt_login_token(), {"username": "二哈", "mobile": TEL,
                                      "workNumber": "76478126312"})
    data = rsep.json().get('data')
    return data.get('id')
if __name__ == '__main__':
    print(staff_id_get())